<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .box {
            width: 100px;
            height: 100px;
            background-color: #ccc;
            border-radius: 10px;
            display: flex;
            margin: 50px;
            padding: 6px;
        }

        .item {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background-color: #000;
            /* margin: 8px; */
        }

        .box1 {
            justify-content: center;
            align-items: center;
        }

        .box2 {
            justify-content: space-around;
        }

        .box2 .item:nth-of-type(2) {
            align-self: flex-end;
        }
        .box3 .item:nth-child(2){
            align-self: center;
        }
        .box3 .item:nth-child(3){
            align-self: flex-end;
        }
        .box4{
            flex-wrap: wrap;
        }
    </style>
</head>

<body>
    <div class="box box1">
        <div class="item"></div>
    </div>
    <div class="box box2">
        <div class="item"></div>
        <div class="item"></div>
    </div>
    <div class="box box3">
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
    </div>
    <div class="box box4">
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
        <div class="item"></div>
    </div>
</body>

</html>